<template>
  <div id="app">
      <div class="content">
        <Head></Head>
        <Menubar></Menubar>
        <div class="tianjia">添加成功</div>
      </div>
      <Footer class="footer"></Footer>
  </div>
</template>

<script>
import Head from "../components/heads.vue";
import Menubar from "../components/menubar.vue";
import Footer from "../components/footer.vue";
export default {
  name: 'App',
  components: {
    Head,Menubar,Footer
  },
  mounted(){
    var oTianjia = document.querySelector('.tianjia')
    if(this.$store.state.tian==1){
      oTianjia.style.display = "block"
      setTimeout(function(){
         oTianjia.style.display = "none"
      },1000) 
      this.$store.state.tian=0
      console.log("this.$store.state.tian",this.$store.state.tian);
    }else{
       oTianjia.style.display = "none"
    }
  }
}

</script>

<style>
.content{
    padding-bottom: 0.51rem;
}
.footer{
  position: fixed;
  bottom: 0;
}
.tianjia{
  width: 0.8rem;
  font-size: 0.14rem;
  background-color: #00000090;
  color: rgb(207, 204, 204);
  border-radius: 0.04rem;
  text-align: center;
  margin: auto;
  position: fixed;
  left: 50%;
  bottom: 0.6rem;
  transform: translateX(-50%);
  transition: all 1s;
  display: none;
}
</style>
